(function() {
  function snow(left, height, src) {
    var div = document.createElement("div");
    var img = document.createElement("img");
    div.appendChild(img);
    img.className = "roll";
    img.src = src;
    div.style.left = left + "px";
    div.style.height = height + "px";
    div.className = "div";
    document.getElementById("snowzone").appendChild(div);
    setTimeout(function() {
      document.getElementById("snowzone").removeChild(div);
      // console.log(window.innerHeight);
    }, 10000);
  }
  setInterval(function() {
    var left = Math.random() * window.innerWidth;
    var height = Math.random() * window.innerHeight;
    var src = "img/q" + Math.floor(Math.random() * 17 + 1) + ".gif";
    snow(left, height, src);
  }, 200);
})();
